home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Turnbull China Bikeride
/
Turnbull China Bikeride - Disc 2.iso
/
BARNET
/
FREENET
/
CROFT
/
GROUPS02
/
!Groups
/
GrabList
(
.txt
)
< prev
next >
Wrap
RISC OS BBC BASIC V Source
|
1995-07-10
|
1KB
|
45 lines
>GrabList
Grabs a newsgroups list from an NNTP server
David Croft, 1995
*RMEnsure Internet 0.00 Error 0 You need a TCP/IP protocol stack (such as FreeNet or Acorn TCP/IP) to grab the newsgroups list.
"GrabList 0.01dummy
David Croft, 1995"
"OS_GetEnv"
com$
temp%=
com$," -o ")
temp%=0
"Syntax: GrabList -o <output filename>":
file$=
com$,temp%+4)
"Output filename: ";file$
''"Enter the hostname or IP address of the news server you want to"'"connect to. (Demon users could use news.demon.co.uk)"'
"NNTP server: "server$
(server$)=0
"XOS_SWINumberFromString",,"Internet_GetHostByName"
swi%;flags%
(flags%
1)=1
swi%=0
'"You cannot specify by hostname if you do not have InetDB."'"Use an IP address instead.":
Lookup using InetDB
"Internet_GetHostByName",0,server$
,hostent%
hostent%=0
"No host found!"
hostent%?20
hostent%?21
hostent%?22
hostent%?23
"Initialising connection."
"(The rest of the procedure has not been completed)"
string(st,ptr)
st$=""
(st?ptr)>=32
(st$)<255
st$+=
(st?ptr)
ptr+=1
'"(Program terminated)"
3 *quit